\hypertarget{classGraphicItem}{
\section{GraphicItem Class Reference}
\label{classGraphicItem}\index{GraphicItem@{GraphicItem}}
}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classGraphicItem_ae39c9ddf5168c365138540e010ca6d8f}{GraphicItem} (int, int, int, int, QString, QString, QString, \hyperlink{classMainWindow}{MainWindow} $\ast$window, int)
\begin{DoxyCompactList}\small\item\em A new graphic item is initialized. \item\end{DoxyCompactList}\item 
\hyperlink{classGraphicItem_aa502ffe9cf1bc733f5d21f14adf31670}{$\sim$GraphicItem} ()
\item 
void \hyperlink{classGraphicItem_af9b320053cd99e8c787bdf782c032624}{paintRect} (QPainter $\ast$)
\item 
\hypertarget{classGraphicItem_a76cc0212587517426539b10fc4c0cb31}{
void {\bfseries paintPlayer} (QPainter $\ast$)}
\label{classGraphicItem_a76cc0212587517426539b10fc4c0cb31}

\item 
\hypertarget{classGraphicItem_ab52357614772dfcb19027b4dae5ea987}{
void {\bfseries paintImage} (QPainter $\ast$)}
\label{classGraphicItem_ab52357614772dfcb19027b4dae5ea987}

\item 
\hypertarget{classGraphicItem_af3bc35e6c2579eaa3d29de2ed0d2f19e}{
void {\bfseries paintSheep} (QPainter $\ast$)}
\label{classGraphicItem_af3bc35e6c2579eaa3d29de2ed0d2f19e}

\item 
QRectF \hyperlink{classGraphicItem_a28dba31cb866a341260ff96d431ed474}{boundingRect} () const 
\item 
void \hyperlink{classGraphicItem_a0cca6d18934673ed5e132951770b0900}{paint} (QPainter $\ast$, const QStyleOptionGraphicsItem $\ast$, QWidget $\ast$)
\item 
\hypertarget{classGraphicItem_a0fd981c786fa13c9276d918afc9601b1}{
void {\bfseries setDirectionX} (int)}
\label{classGraphicItem_a0fd981c786fa13c9276d918afc9601b1}

\item 
\hypertarget{classGraphicItem_afa6416c4c179cdf9f6f26e103fdea638}{
void {\bfseries setDirectionY} (int)}
\label{classGraphicItem_afa6416c4c179cdf9f6f26e103fdea638}

\item 
\hypertarget{classGraphicItem_a9ccbe490381107ed0faef4cd0d951b5f}{
void {\bfseries setNewX} (int)}
\label{classGraphicItem_a9ccbe490381107ed0faef4cd0d951b5f}

\item 
\hypertarget{classGraphicItem_afd4700f0169c51c7e23381e83e39ace4}{
void {\bfseries setNewY} (int)}
\label{classGraphicItem_afd4700f0169c51c7e23381e83e39ace4}

\item 
\hypertarget{classGraphicItem_a06696880a98e76d80a1a0a4064dade6c}{
void {\bfseries setLife} (int)}
\label{classGraphicItem_a06696880a98e76d80a1a0a4064dade6c}

\item 
\hypertarget{classGraphicItem_a71d04e0b34503e2f0e0d3ef521866786}{
void {\bfseries setPoints} (int)}
\label{classGraphicItem_a71d04e0b34503e2f0e0d3ef521866786}

\item 
\hypertarget{classGraphicItem_a2042c4841b7564ebb43f781b68f3eb77}{
void {\bfseries setEggs} (int)}
\label{classGraphicItem_a2042c4841b7564ebb43f781b68f3eb77}

\item 
\hypertarget{classGraphicItem_acbe753a7e73e398fc0f5dded4564a6dd}{
bool {\bfseries isVisible} ()}
\label{classGraphicItem_acbe753a7e73e398fc0f5dded4564a6dd}

\item 
\hypertarget{classGraphicItem_a665c851049a5fd77363c9afceec8dafe}{
void {\bfseries setIsVisible} (bool)}
\label{classGraphicItem_a665c851049a5fd77363c9afceec8dafe}

\item 
\hypertarget{classGraphicItem_a37af84c954abfb34f5f4ef5e45ad3f87}{
void {\bfseries setId} (int)}
\label{classGraphicItem_a37af84c954abfb34f5f4ef5e45ad3f87}

\item 
\hypertarget{classGraphicItem_aaa2110ff356b1b5adeae82cc862396d7}{
int {\bfseries getId} ()}
\label{classGraphicItem_aaa2110ff356b1b5adeae82cc862396d7}

\item 
\hypertarget{classGraphicItem_a9f29c2b8f1449466cd11d8a064450f4e}{
int {\bfseries getX} ()}
\label{classGraphicItem_a9f29c2b8f1449466cd11d8a064450f4e}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classGraphicItem_afa2b9d2368564680b1cd7e24ce20de00}{advance} (int)
\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classGraphicItem_aa23a3b7bab4dfdba32e3532ca1d2984b}{
void {\bfseries renderizePlayer} (int\mbox{[}$\,$\mbox{]}, QPainter $\ast$)}
\label{classGraphicItem_aa23a3b7bab4dfdba32e3532ca1d2984b}

\item 
\hypertarget{classGraphicItem_a7779518c39a092820956859eb42c4e9e}{
void {\bfseries renderizeSheep} (int\mbox{[}$\,$\mbox{]}, QPainter $\ast$)}
\label{classGraphicItem_a7779518c39a092820956859eb42c4e9e}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classGraphicItem_a177442d943193a1c46daf94398557629}{
int {\bfseries id}}
\label{classGraphicItem_a177442d943193a1c46daf94398557629}

\item 
\hypertarget{classGraphicItem_a7dd7fb8bc214f6645a4616e28c1afcda}{
int {\bfseries x}}
\label{classGraphicItem_a7dd7fb8bc214f6645a4616e28c1afcda}

\item 
\hypertarget{classGraphicItem_a402643b6c5e006b0e771b82b871aae59}{
int {\bfseries y}}
\label{classGraphicItem_a402643b6c5e006b0e771b82b871aae59}

\item 
\hypertarget{classGraphicItem_aed6225cd81d84e7299abe440c24ed671}{
int {\bfseries w}}
\label{classGraphicItem_aed6225cd81d84e7299abe440c24ed671}

\item 
\hypertarget{classGraphicItem_a256fe672fee9f76f27d0c08129ac2cd7}{
int {\bfseries h}}
\label{classGraphicItem_a256fe672fee9f76f27d0c08129ac2cd7}

\item 
\hypertarget{classGraphicItem_adbe5a1f9a9717ebb8b06c2f5e0af08c7}{
int {\bfseries directionX}}
\label{classGraphicItem_adbe5a1f9a9717ebb8b06c2f5e0af08c7}

\item 
\hypertarget{classGraphicItem_a72e66cd8ca72fdf7b788142c4e49a70e}{
int {\bfseries directionY}}
\label{classGraphicItem_a72e66cd8ca72fdf7b788142c4e49a70e}

\item 
\hypertarget{classGraphicItem_a94c57b3d8d93e47788f920f4cd176ec6}{
bool {\bfseries visible}}
\label{classGraphicItem_a94c57b3d8d93e47788f920f4cd176ec6}

\item 
\hypertarget{classGraphicItem_ab9cdc0be629c642ad7d3b5955c29f59f}{
bool {\bfseries isImmortal}}
\label{classGraphicItem_ab9cdc0be629c642ad7d3b5955c29f59f}

\item 
\hypertarget{classGraphicItem_acffde6bbe8515823e8fa2829f9b9723b}{
int {\bfseries life}}
\label{classGraphicItem_acffde6bbe8515823e8fa2829f9b9723b}

\item 
\hypertarget{classGraphicItem_a2fb8006302b93e7e5c780625c1e9ba14}{
int {\bfseries points}}
\label{classGraphicItem_a2fb8006302b93e7e5c780625c1e9ba14}

\item 
\hypertarget{classGraphicItem_ae630919d6b242649d1ccd7800a8da4ce}{
int {\bfseries eggs}}
\label{classGraphicItem_ae630919d6b242649d1ccd7800a8da4ce}

\item 
\hypertarget{classGraphicItem_a7fc83a3e78e3ad42162c0aa48aa71206}{
int {\bfseries time}}
\label{classGraphicItem_a7fc83a3e78e3ad42162c0aa48aa71206}

\item 
\hypertarget{classGraphicItem_a91971a6e6c54311b6e6465b59736f9d0}{
QColor {\bfseries color}}
\label{classGraphicItem_a91971a6e6c54311b6e6465b59736f9d0}

\item 
\hypertarget{classGraphicItem_ae992094d2543bab88d8a93acf548eae8}{
\hyperlink{classMainWindow}{MainWindow} $\ast$ {\bfseries window}}
\label{classGraphicItem_ae992094d2543bab88d8a93acf548eae8}

\item 
\hypertarget{classGraphicItem_ab75d78cf71868c2e861569406c694b99}{
QSvgRenderer $\ast$ {\bfseries imageRenderer}}
\label{classGraphicItem_ab75d78cf71868c2e861569406c694b99}

\item 
\hypertarget{classGraphicItem_aa027eaadfaf0dd974eb07cc1b67bf949}{
int {\bfseries imageSize}}
\label{classGraphicItem_aa027eaadfaf0dd974eb07cc1b67bf949}

\item 
\hypertarget{classGraphicItem_a060d774f3af42c3eeb10d3dcd4cdddd5}{
int {\bfseries texture\_\-offset}}
\label{classGraphicItem_a060d774f3af42c3eeb10d3dcd4cdddd5}

\item 
\hypertarget{classGraphicItem_aea38603beb906154f5205691af7935f3}{
void(GraphicItem::$\ast$ {\bfseries paintFunction} )(QPainter $\ast$)}
\label{classGraphicItem_aea38603beb906154f5205691af7935f3}

\end{DoxyCompactItemize}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{classGraphicItem_ae39c9ddf5168c365138540e010ca6d8f}{
\index{GraphicItem@{GraphicItem}!GraphicItem@{GraphicItem}}
\index{GraphicItem@{GraphicItem}!GraphicItem@{GraphicItem}}
\subsubsection[{GraphicItem}]{\setlength{\rightskip}{0pt plus 5cm}GraphicItem::GraphicItem (int {\em x}, \/  int {\em y}, \/  int {\em h}, \/  int {\em w}, \/  QString {\em col}, \/  QString {\em img}, \/  QString {\em type}, \/  {\bf MainWindow} $\ast$ {\em window}, \/  int {\em texture\_\-offset})}}
\label{classGraphicItem_ae39c9ddf5168c365138540e010ca6d8f}


A new graphic item is initialized. 

A new graphic item is initialized, the paint function to use is decided basing on the type of object \hypertarget{classGraphicItem_aa502ffe9cf1bc733f5d21f14adf31670}{
\index{GraphicItem@{GraphicItem}!$\sim$GraphicItem@{$\sim$GraphicItem}}
\index{$\sim$GraphicItem@{$\sim$GraphicItem}!GraphicItem@{GraphicItem}}
\subsubsection[{$\sim$GraphicItem}]{\setlength{\rightskip}{0pt plus 5cm}GraphicItem::$\sim$GraphicItem ()}}
\label{classGraphicItem_aa502ffe9cf1bc733f5d21f14adf31670}
The graphic item is deleted and all the pointers are deleted or set to null 

\subsection{Member Function Documentation}
\hypertarget{classGraphicItem_afa2b9d2368564680b1cd7e24ce20de00}{
\index{GraphicItem@{GraphicItem}!advance@{advance}}
\index{advance@{advance}!GraphicItem@{GraphicItem}}
\subsubsection[{advance}]{\setlength{\rightskip}{0pt plus 5cm}void GraphicItem::advance (int)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classGraphicItem_afa2b9d2368564680b1cd7e24ce20de00}
Moves and redravs the WorldElement represented by this class. \hypertarget{classGraphicItem_a28dba31cb866a341260ff96d431ed474}{
\index{GraphicItem@{GraphicItem}!boundingRect@{boundingRect}}
\index{boundingRect@{boundingRect}!GraphicItem@{GraphicItem}}
\subsubsection[{boundingRect}]{\setlength{\rightskip}{0pt plus 5cm}QRectF GraphicItem::boundingRect () const}}
\label{classGraphicItem_a28dba31cb866a341260ff96d431ed474}
It returns the area on the screen that have to be readrawn when the item is moved inside the \hyperlink{classGraphicsScene}{GraphicsScene}. \hypertarget{classGraphicItem_a0cca6d18934673ed5e132951770b0900}{
\index{GraphicItem@{GraphicItem}!paint@{paint}}
\index{paint@{paint}!GraphicItem@{GraphicItem}}
\subsubsection[{paint}]{\setlength{\rightskip}{0pt plus 5cm}void GraphicItem::paint (QPainter $\ast$ {\em painter}, \/  const QStyleOptionGraphicsItem $\ast$, \/  QWidget $\ast$)}}
\label{classGraphicItem_a0cca6d18934673ed5e132951770b0900}
It handles the visual style for the Block, Enemy and Player. \hypertarget{classGraphicItem_af9b320053cd99e8c787bdf782c032624}{
\index{GraphicItem@{GraphicItem}!paintRect@{paintRect}}
\index{paintRect@{paintRect}!GraphicItem@{GraphicItem}}
\subsubsection[{paintRect}]{\setlength{\rightskip}{0pt plus 5cm}void GraphicItem::paintRect (QPainter $\ast$ {\em painter})}}
\label{classGraphicItem_af9b320053cd99e8c787bdf782c032624}
It handles the visual style for the Block, Enemy and Player. 

The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
GraphicItem.h\item 
GraphicItem.cpp\end{DoxyCompactItemize}
